package collections;
import java.util.*;
public class StackTest {
    public static void main(String[] args){
        Deque<String> stack = new ArrayDeque<>();
        for(String s:"My dog has fleas".split(" ")){
            System.out.println(s);
        }
        while (!stack.isEmpty()){
            System.out.println(stack.peek());
        }
    }
}
